<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<!-- pageEncoding="UTF-8"%> -->



<%-- <%@ taglib prefix="s" uri="/struts-tags"%> --%>
<%-- <%@ page contentType="text/html;charset=UTF-8"language="java"%> --%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%-- <%@ page import="edu.uit.se.laps.web.*,java.util.*,java.text.*" %> --%>
<%@ page
	import="edu.uit.se.laps.web.*,edu.uit.se.laps.web.controller.*, java.net.*,java.text.*,java.util.*"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style>
body,input {
	font-family: Calibri, Arial;
}

table#contact {
	border-collapse: collapse;
	width: 550px;
}

th {
	height: 40px;
	background-color: #ffee55;
}
</style>
<title>Quản Lý Sản Phẩm - Struts2 Hibernate Web</title>


</head>
<body>
	<%
		ShoppingCart cart = (ShoppingCart) session
				.getAttribute("ShoppingCart");

		if (cart == null) {
			cart = new ShoppingCart();
			session.setAttribute("ShoppingCart", cart);
		}

		//Vector items = cart.getItems();

		//if (items.size() != 0) {

		//}
	%>

	<h1>Chi Tiet Gio Hang</h1>
	<a href="showfashion">Tiep tuc mua hang</a>
	<!-- 	<a href="showSP">Show sp</a> -->

	<h2>Thông tin sản phẩm</h2>
	<table id="ctdonhang" border="1">
		<tr>
			<th>Id chi tiet don hang</th>
			<th>Id don hang</th>
			<th>Id san pham</th>
			<th>Đơn giá</th>
			<th>Số Lượng</th>
			<th>thanh tien</th>
			<th>Xoa san pham</th>

		</tr>
		<s:iterator value="ctdhList" var="ctdh">
			<tr>

				<td><div>
						<s:property value="idCTDH" />
					</div></td>
				<td><s:property value="idDH" /></td>
				<td><s:property value="idSP" /></td>
				<td><s:property value="donGia" /></td>
				<td><s:property value="soLuong" /></td>
				<td><s:property value="thanhTien" /></td>
				<td><a href="deleteItemCart?idsp=<s:property value="idSP"/>">
						Xoa </a> <%-- 				<td><a href="showupdate?idsp=<s:property value="idSP"/>">Update</a></td> --%>
				</td>
			</tr>
		</s:iterator>
	</table>

	<a href="checkout">Check Out!</a>
	<h5>So tien phai tra la: ${sumMoney}</h5>

</body>
</html>